package environment.data;


public abstract class BaseEnvironmentData {
    public enum  EnvironmentData{TEMPERATURE,LIGHT,WET};
    public enum  EnvironmentOptions{PLUS,MINUS,SET};
    private Boolean useEnvironmentData = false;
    private EnvironmentData type;
    private Long value;

    public Boolean getUseEnvironmentData() {
        return useEnvironmentData;
    }

    public void setUseEnvironmentData(Boolean useEnvironmentData) {
        this.useEnvironmentData = useEnvironmentData;
    }

    public void useEnvironmentData() {
        this.useEnvironmentData = true;
    }

    public EnvironmentData getType() {
        return type;
    }

    public void setType(EnvironmentData type) {
        this.type = type;
    }

    public Long getValue() {
        return value;
    }

    public void setValue(Long value) {
        this.value = value;
    }

    public void updateValue(Long newValue,EnvironmentOptions opt){
        switch (opt){
            case PLUS:
                value+=newValue;
                break;
            case MINUS:
                value-=newValue;
                break;
        }
    }
}
